{{- define "machine_controller_manager_enabled" }}
  {{- if not .Values.nodeManager.mcmEmergencyBrake }}
    {{- if .Values.nodeManager.internal.machineControllerManagerEnabled }}
      not empty string
    {{- end }}
  {{- end }}
{{- end }}

{{- define "cluster_autoscaler_enabled" }}
  {{- range $ng := .Values.nodeManager.internal.nodeGroups }}
    {{- if eq $ng.nodeType "CloudEphemeral" }}
      {{- if lt (int $ng.cloudInstances.minPerZone) (int $ng.cloudInstances.maxPerZone) }}
        not empty string
      {{- end }}
    {{- end }}
  {{- end }}
{{- end }}
